package com.woniu.coupon.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.woniu.coupon.mapper.CouponCategoryMapper;
import com.woniu.coupon.domain.CouponCategory;
import com.woniu.coupon.service.ICouponCategoryService;

/**
 * 优惠券类型Service业务层处理
 * 
 * @author yy
 * @date 2023-04-03
 */
@Service
public class CouponCategoryServiceImpl implements ICouponCategoryService 
{
    @Autowired
    private CouponCategoryMapper couponCategoryMapper;

    /**
     * 查询优惠券类型
     * 
     * @param id 优惠券类型主键
     * @return 优惠券类型
     */
    @Override
    public CouponCategory selectCouponCategoryById(Long id)
    {
        return couponCategoryMapper.selectCouponCategoryById(id);
    }

    /**
     * 查询优惠券类型列表
     * 
     * @param couponCategory 优惠券类型
     * @return 优惠券类型
     */
    @Override
    public List<CouponCategory> selectCouponCategoryList(CouponCategory couponCategory)
    {
        return couponCategoryMapper.selectCouponCategoryList(couponCategory);
    }

    /**
     * 新增优惠券类型
     * 
     * @param couponCategory 优惠券类型
     * @return 结果
     */
    @Override
    public int insertCouponCategory(CouponCategory couponCategory)
    {
        return couponCategoryMapper.insertCouponCategory(couponCategory);
    }

    /**
     * 修改优惠券类型
     * 
     * @param couponCategory 优惠券类型
     * @return 结果
     */
    @Override
    public int updateCouponCategory(CouponCategory couponCategory)
    {
        return couponCategoryMapper.updateCouponCategory(couponCategory);
    }

    /**
     * 批量删除优惠券类型
     * 
     * @param ids 需要删除的优惠券类型主键
     * @return 结果
     */
    @Override
    public int deleteCouponCategoryByIds(Long[] ids)
    {
        return couponCategoryMapper.deleteCouponCategoryByIds(ids);
    }

    /**
     * 删除优惠券类型信息
     * 
     * @param id 优惠券类型主键
     * @return 结果
     */
    @Override
    public int deleteCouponCategoryById(Long id)
    {
        return couponCategoryMapper.deleteCouponCategoryById(id);
    }
}
